package com.yc.system.mapper;

import com.yc.system.entity.UserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 用户角色表 Mapper 接口
 * </p>
 *
 * @author 1850140986@qq.com
 * @since 2022-12-03
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Insert("insert into t_user_role (user_id,role_id) values (#{userId},2)")
    int addUserByUserId(Long userId);

    @Insert("insert into t_user_role (user_id,role_id) values (#{userId},1)")
    int addAdminByUserId(long userId);
}
